home *** CD-ROM | disk | FTP | other *** search
- The files in this directory are for a Mac. like file chooser.
-
- It contains the file chooser in two versions. The first is a command line version, which
- can be executed from unix with a variety of options. The second is a C procedure version,
- which can be linked to ones own program.
-
-
- To Make the versions, type "make sun" if you are using a sun and likewise type "make
- iris" if you are using an iris. This will make two programs: command and choose.
- Choose is a compiled version of the sample.c program and is an example of using the
- file chooser in the procedural form. Command is the command line version. By just
- typing "command" at the unix prompt, the file chooser will start with default settings.
-
-
- Command line options:
-
- -w
- -write
- Use the write mode of the file chooser. Note that one can choose only one file at a
- time, since one would only want to save something to one file.
-
- -r
- -read
- Use the read mode of the file chooser. Now one can select several files to read from.
- Note that this is the default setting, so using this option is redundant.
-
- -d
- -dir
- This selects the directory to start the chooser in. One would type "-dir /usr/games"
- to start the file chooser in the /usr/games directory. Note that the default is
- "-dir .".
-
- -n
- -names
- This selects the initial names that would start highlighted. For example if one
- typed "-names 2 tetris backgammon" the chooser will start up with tetris and
- backgammon highlighted. It is possible to use wildcards in this system. Just type
- ''-names 2 "*.c" "*.o" `` to select all the .c and .o files. ( the "" are
- intentional)
-
- -s
- -suffix
- This limits ones selections to the files that match the suffixs. For example, if
- one typed ''-suffix 2 "*.c" "*.o" ``, only the .c and .o files will be displayed at
- all. This is different from the -names option in that -suffix option chooses the
- files to be displayed in the window, the -name option chooses which ones will be
- initially highlighted.
-
- Procedure calling:
-
- choosefile(&namesc,&namesv,&enddir,startdir,writeorread);
-
- Where the variables are defined by:
-
- char **namesv;
- char *enddir;
- char *startdir;
- int namesc;
- int writeorread;
-
- To start the chooser in write mode, writeorread should be set to 1. Otherwise, one
- should set writeorread to 0 to start in read mode.
-
- One only needs this call to access the program. It even mallocates the memory for
- "**namesv".
-
- If one wants to free the memory that the program allocate for "**namesv", one should
- call:
- chfree(&namesc,&namesv);
-
- ----------------------
- The suffix commands are
- suflist(name) (does name agree with suffixes)
- delsuff(name) (delete name from suffixes)
- addsuff(name) (add name to suffixes)
- clearsuff() (clear suffixes)
-
-